/*    */ package cc.s2m.web.s2mBlog.task;
/*    */ 
/*    */ import cc.s2m.open_all_open.weixin.WxBasic;
/*    */ import cc.s2m.web.s2mBlog.util.StaticProp;
/*    */ import com.google.common.base.Strings;
/*    */ import org.apache.logging.log4j.Logger;
/*    */ import org.springframework.scheduling.annotation.EnableScheduling;
/*    */ import org.springframework.scheduling.annotation.Scheduled;
/*    */ import org.springframework.stereotype.Component;
/*    */ 
/*    */ @Component
/*    */ @EnableScheduling
/*    */ public class RefreshWxTokenTask extends BaseTask
/*    */ {
/*    */   @Scheduled(cron="0 */1 * * * *")
/*    */   public void run()
/*    */   {
/* 17 */     super.run();
/*    */   }
/*    */ 
/*    */   public void doTask()
/*    */   {
/* 24 */     String token = WxBasic.getToken(StaticProp.getSysConfigString("weixin.appid"), StaticProp.getSysConfigString("weixin.secret"));
/*    */ 
/* 27 */     if (Strings.isNullOrEmpty(token)) {
/* 28 */       StaticProp.SYSTEM.error("无法定时刷新获取微信token数据");
/* 29 */       return;
/*    */     }
/* 31 */     StaticProp.WX_TOKEN = token;
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\s2mBlog.zip
 * Qualified Name:     s2mBlog-3.0.0.WEB-INF.classes.cc.s2m.web.s2mBlog.task.RefreshWxTokenTask
 * JD-Core Version:    0.6.1
 */